package com.application.fabric;

import java.io.File;

public class t {
    public static void main(String[] args) {
        changemain();
    }

     static void changemain() {
         File directory = new File("/home/hatelys/桌面/tem");
         File[] fileList = directory.listFiles();
//         for (File file : fileList) {
////            String fileName = file.getName();
//             String newFileName = "test.gif";
//             file.renameTo(new File(directory, newFileName));
//         }
         for (int i=0;i<fileList.length;i++){
             String newFileName = "test"+i+".jpg";
             fileList[i].renameTo(new File(directory, newFileName));
         }
     }
}
